package day07;

import java.util.Scanner;

public class CalAirPrice {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入月份");
        int month=scan.nextInt();
        System.out.println("请输入机票原价");
        int price=scan.nextInt();
        System.out.println("请选择1.头等舱，2.商务舱，3，经济舱");
        int cabin=scan.nextInt();
        switch (cabin){
            case 1:
            if(month>=11||month<=4){
                price*=0.7;
                System.out.println("机票价格为："+price);
            }
            else{
                price*=0.9;
                System.out.println("机票价格为："+price);
            }
            break;
            case 2:
                if(month>=11||month<=4){
                    price*=0.65;
                    System.out.println("机票价格为："+price);
                }
                else{
                    price*=0.85;
                    System.out.println("机票价格为："+price);
                }
                break;
            case 3:
                if(month>=11||month<=4){
                    price*=0.6;
                    System.out.println("机票价格为："+price);
                }
                else{
                    price*=0.8;
                    System.out.println("机票价格为："+price);
                }
            default:

        }
    }
}
